package com.gollum.system.domain.model;

import com.gollum.jpa.domain.HertherBaseEnity;
import lombok.*;
import lombok.experimental.Accessors;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EntityListeners;
import javax.persistence.Table;

/**
 * 机构 sys_dept
 * 
 * @author herther
 */
@Getter
@Setter
@AllArgsConstructor
@Accessors(chain=true)
@NoArgsConstructor
@Entity
@Table(name = "sys_dept")
@EntityListeners(AuditingEntityListener.class)
public class SysDept extends HertherBaseEnity
{
    private static final long serialVersionUID = 1L;


    /** 父部门ID */
    @Column(name = "parent_id")
    private Long parentId;

    /** 祖级列表 */
    @Column(name = "ancestors")
    private String ancestors;

    /** 部门名称 */
    @Column(name = "dept_name",length = 100)
    private String deptName;

    /** 显示顺序 */
    @Column(name = "order_num",length = 50)
    private Integer orderNum;

    /** 负责人 */
    @Column(name = "leader",length = 50)
    private String leader;

    /** 联系电话 */
    @Column(name = "phone",length = 50)
    private String phone;

    /** 邮箱 */
    @Column(name = "email",length = 50)
    private String email;

    /** 机构状态:0正常,1停用 */
    @Column(name = "status",length = 10)
    private String status;

}
